-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render a link to source repo #22
base: main
Are you sure you want to change the base?
Conversation
✔️ Deploy Preview for gracious-brattain-bdd606 ready! 🔨 Explore the source changes: 6842546 🔍 Inspect the deploy log: https://app.netlify.com/sites/gracious-brattain-bdd606/deploys/61b6f2547ab16a0007b989cf 😎 Browse the preview: https://deploy-preview-22--gracious-brattain-bdd606.netlify.app |
Awesome! Love how you banged this out! 🥇 And sorry, I feel like I've been peppering comments about this PR in other issues w/o fully addressing it here, so let me pull some of those together... First, from #12 (comment):
To which you responded:
And I back:
So maybe we could pick up that thread here. Apart from that, I was going to suggest moving the Lemme know what you think about all that. I'm gonna try plowing ahead with #12 in the meantime, and will probably be AFK most of tomorrow, so I may not be super responsive, but thanks for taking the charge on this! Huzzah! |
Ah yep, I like this is idea! Not that it's too important, but I realized the table of contents nav is hidden on mobile anyways. As far as implementation goes I think the latter idea makes sense.. but to clarify, by "pulling in the plugin" does that mean it will add these fields itself? Then they will be available elsewhere without our doing? I'm starting to get an idea how this Gatsby thing works :D |
Ah yea, good point.
Oh no, nothing so fancy. const webLink = config.remote.replace(/\.git$/, ''); I hesitated to suggest that before b/c it may not be as rigorous and wouldn't catch for, say, an |
It occurs to me that we still don't have a link to GitHub repositories on farmOS.org (3 years after this issue was opened). 😅 How about we rename this PR to "Automatically render a link to source repo" and we open a new PR that manually adds some links somewhere? Maybe just on the homepage? :-) We had a similar complaint recently from someone who pointed out that they were frustrated that the homepage didn't have any simple "Download" button or I'll throw a quick PR together that just adds quick links to the GitHub repos to the homepage, along with a link to the "Install" guide. |
This needs to be ironed out a bit more, but opening a PR to see if this is going in the right direction. See #21
I noticed that the
gatsby-source-git
plugin adds agitRemote
field with different bits of data, including awebLink
. I think that could work well here! As mentioned in their docs, this might help to implement an "edit on github" link as well: https://www.gatsbyjs.com/plugins/gatsby-source-git/For demonstration I put the source link above the table of contents. This seems like a natural area to include the source link (and maybe the source version??) but open to ideas! This mostly fulfilled the exercise of "I want to put a link here, how do I do that" and to help learn how some of these things are working
I'm also not sure how this React markup works.. I'm sure there's a better way to render a stylized link here... but I guess maybe we want the Github icon prefixed as well... so perhaps this could be its own component? Maybe one already exists?